package com.example.demo.service.impl;

import com.example.demo.entity.AdminPermission;
import com.example.demo.mapper.AdminPermissionMapper;
import com.example.demo.service.AdminPermissionService;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 管理员用户权限服务层实现类
 *
 * @author 叮当猫的百宝箱
 * @since 1.0
 */
@Service
@RequiredArgsConstructor
public class AdminPermissionServiceImpl implements AdminPermissionService {

    private final AdminPermissionMapper adminPermissionMapper;

    /**
     * 根据管理员用户ID获取管理员拥有的全部权限信息
     *
     * @param adminUserId 管理员用户ID
     * @return 管理员拥有的全部权限信息
     */
    @Override
    public List<AdminPermission> getAdminPermissionByAdminUserId(Long adminUserId) {
        return adminPermissionMapper.findByAdminUserId(adminUserId);
    }

}
